package com.atguigu.gmall.product.mapper;

import com.atguigu.gmall.model.product.SpuSaleAttr;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Fxz
 * @version 1.0
 * @date 2022-02-05 20:49
 */
@SuppressWarnings("all")
@Mapper
public interface SpuSaleAttrMapper extends BaseMapper<SpuSaleAttr> {

	/**
	 * 跟据spuId查询spu对应的销售属性以及销售属性值
	 */
	List<SpuSaleAttr> selectSpuSaleAttrList(Long spuId);

	/**
	 * 跟据spuId和skuId查询销售属性和销售属性值
	 */
	List<SpuSaleAttr> selectSpuSaleAttrListCheckBySku(@Param("spuId") Long spuId, @Param("skuId") Long skuId);

}
